package cn.com.chengmandian.bike.service;

import cn.com.chengmandian.bike.model.EbMemberWallet;
import cn.com.chengmandian.bike.model.EbRefundInfo;
import cn.com.chengmandian.bike.model.EbRideOrder;
import cn.com.chengmandian.service.bike.constants.MemberMoneyBusinessTypeEnum;
import cn.com.chengmandian.service.bike.constants.MemberMoneyOperationTypeEnum;
import cn.com.chengmandian.service.bike.form.WalletBalanceRefundForm;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * <p>
 * 电单车运营-用户钱包 服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-08
 */
public interface IEbMemberWalletService extends IService<EbMemberWallet> {
    EbMemberWallet getMemberWallet(Integer memberId);

    void updateBalance(Integer areaId, Integer memberId, BigDecimal money, MemberMoneyBusinessTypeEnum businessType, Integer businessId, MemberMoneyOperationTypeEnum operationType);

    void updateBalanceForBoth(Integer areaId, Integer memberId, BigDecimal chargeMoney, BigDecimal giftMoney, MemberMoneyBusinessTypeEnum businessType, Integer businessId, MemberMoneyOperationTypeEnum operationType);

    void refundMoney(Integer areaId, Integer memberId, MemberMoneyBusinessTypeEnum businessType, Integer businessId,  BigDecimal payChargeMoney, BigDecimal payGiftMoney);

    void walletBalanceRefund(WalletBalanceRefundForm form);

    void walletRefundSuccess(EbRefundInfo ebRefundInfo, String payNo);

    /**
     * 钱包支付骑行订单
     * @param rideOrder
     * @return
     */
    boolean payForRideOrder(EbRideOrder rideOrder);
}
